package org.example.ims.Service.Order;

import org.example.ims.DTO.StockInOutDTO;
import org.example.ims.Entity.Base.Warehouse;
import org.example.ims.Entity.Order.OutStockDetail;
import org.example.ims.Entity.WareHouseProduct.WarehouseProduct;
import org.springframework.data.domain.Page;

import java.util.List;

public interface OutStockDetailService {

    OutStockDetail createDetail(OutStockDetail detail);

    OutStockDetail updateDetail(Integer detailId, OutStockDetail detail);

    void deleteDetail(Integer detailId);

    OutStockDetail getDetailById(Integer detailId);

    Page<OutStockDetail> getAllDetails(Integer page, Integer size);

    Page<OutStockDetail> searchDetails(Integer orderId, Integer productId, Integer warehouseId, Integer page, Integer size);

    //有效性判断 判断productId是否存在，以及对应的仓库容量是否充足
    StockInOutDTO<WarehouseProduct> validityAssessment (List<OutStockDetail> details, Warehouse warehouse);
}